package com.edu.dao;

import com.edu.bean.User;
import com.edu.datasource.type.DatabaseContextHolder;
import com.edu.datasource.type.DatabaseType;
import com.edu.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class UserDao {

    @Autowired
    private UserMapper userMapper;

    public User getUser(Integer id ){
        //不设置切面出现的问题
       // DatabaseContextHolder.setDatabaseType(DatabaseType.test02);
        return userMapper.getShop(id);
    }
}
